1. Field of the Invention
The invention is directed to a data transmission technique and more particularly, to a method and a system for accessing data through an inter-integrated circuit (I2C) bus.
2. Description of Related Art
An inter integrated circuit (I2C) bus is a kind of serial communication bus and is common used in a motherboard, an embedded system or a mobile phone for connecting to low-speed peripheral devices. Recently, the I2C bus is a common data transmission interface used in an electronic product and serves for transferring some low-speed data, which includes a temperature sensor, a speed sensor, a digital gyroscope or the like.
Nevertheless, the I2C bus has a limitation on the number thereof in hardware design, and in most cases, a plurality of I2C devices is connected on the same I2C bus, which often results in a situation that the I2C bus is simultaneously accessed by multiple devices. At this point, in case that control software can not be performed properly, it inevitably leads to incorrect data accessing. Therefore, the system is affected to be unstable, such that the difficulty in the debugging of a driver of a single device occurs during the development process, which results in prolonged development time.